<?php
header("Content-Type:text/html;charset=UTF-8");
include './c/config.php';
$f='';
$zslink='';
$redirect_uri = urlencode('http://climb-game.51wom.com/b.php?f='.$f.'&zslink='.$zslink);
$api_userinfo_base='https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$appId.'&redirect_uri='.$redirect_uri.'&response_type=code&scope=snsapi_base#wechat_redirect';

header('Location: '.$api_userinfo_base);
   


exit;
?>

TRUNCATE `y1_fen`;
TRUNCATE `y1_fen_log`;
TRUNCATE `y1_puv`;
TRUNCATE `zsu_click_log`;
TRUNCATE `zsu_lie_tong`;
TRUNCATE `zsu_phone_tong`;
TRUNCATE `zsu_pvuv_tong`;
TRUNCATE `zsu_total_tong`;
TRUNCATE `zsu_user_log`;
TRUNCATE `zsu_user_time`;
TRUNCATE `zsu_xijun_log`;
TRUNCATE `zsu_xijun_tong`;
TRUNCATE `y1_share`;
 

<?php
exit;
$aes_key = 'bUYJ3nTV6VBasdJF';  
function theEncrypt($str, $aes_key) {
        $data = openssl_encrypt($str, 'AES-128-ECB', $aes_key, OPENSSL_RAW_DATA);
        $data = base64_encode($data);
        return $data;
}
function theDecrypt($str, $aes_key) {
        $decrypted = openssl_decrypt(base64_decode($str), 'AES-128-ECB', $aes_key, OPENSSL_RAW_DATA);
        return $decrypted;
}

$theHi=theEncrypt(1987, $aes_key);

echo $theHi;
echo "<br />";
echo theDecrypt($theHi, $aes_key);


exit;
$url='http://climb-game.51wom.com/app/data/upload/admin/20210324/605ad8286a965.png';
$img = imagecreatefrompng($url);
echo "图像宽度：",imagesx( $img ),"<br />";
echo "图像高度：",imagesy( $img );

exit;
include './c/config.php';
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);

function filterEmoji($str)
{
    $str = preg_replace_callback(
        '/./u',
        function (array $match) {
            return strlen($match[0]) >= 4 ? '' : $match[0];
        },
        $str);
    
    return $str;
}

$queryP=$mysqli->query("SELECT id,nickname FROM `y1_users` ");
while ($list=$queryP->fetch_assoc()){
    $name=addslashes(filterEmoji(base64_decode($list['nickname'])));
    $mysqli->query("update `y1_users` set name='".$name."' where id='".$list['id']."'  ");
    var_dump($list);
    echo "<br />";
}
    
 